package edu.moravian;

import edu.moravian.exceptions.VideoConfigurationException;
import edu.moravian.game.BouncingBallGame;
import edu.moravian.video.VideoController;

/**
 * The start-up for our game.
 * 
 * @author mebjc01
 */
public class Main
{
    //the screen demensions
    private final static int DWIDTH = 1920;
    private final static int DHEIGHT = 1080;
    private final static int DBITDEPTH = 32;
    
    //the world demensions
    private final static double WORLD_WIDTH = 960.0;
    private final static double WORLD_HEIGHT = WORLD_WIDTH * ((double)DHEIGHT/DWIDTH);

    public static void main(String[] args) 
    {
        // Create our game with a world size equal to
        // the screen size
        BouncingBallGame g = new BouncingBallGame(WORLD_WIDTH, WORLD_HEIGHT);


        try
        {
            // Create the video controller.  This will throw if something
            // goes wrong
            VideoController video = new VideoController(DWIDTH, DHEIGHT, DBITDEPTH, g, WORLD_WIDTH, WORLD_HEIGHT);

            // And run the game
            new Thread(video).start();
        }
        catch (VideoConfigurationException ex)
        {
            System.out.println("Unable to display " + DWIDTH + "x" + DHEIGHT +
                    "x" + DBITDEPTH + " in full screen mode");
        }

    }


        
        
    
}
